#导入模块
from  urllib import request
#向网站发送get请求

headers={
    'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
}

req = request.Request(headers=headers,url='http://httpbin.org/get')

response = request.urlopen(req)
html=response.read().decode()
print(html)